'use strict';

var gulp = require('gulp');
var revCollector = require('gulp-rev-collector');
var config = require('../config');

gulp.task('revJS', function() {
    return gulp.src([
        config.build.src + "/**/*.json",
        config.js.dest + "/**/*.js"
    ]).pipe(revCollector({replaceReved: true})).pipe(gulp.dest(config.js.dest));
})

//文件名替换
gulp.task('rev', ['revJS'], function() {
    return gulp.src([
        config.build.src + "/**/*.json",
        config.html.dest + "/**/*.html"
    ]).pipe(revCollector({replaceReved: true})).pipe(gulp.dest(config.html.dest));
})
